package com.crm.system.service.workOrderManager;

import com.crm.common.model.DhPageInfo;
import com.crm.model.entity.workOrderManager.WorkOrder;
import com.crm.model.entity.workOrderManager.WorkOrderCreditDeductRecord;
import com.crm.model.entity.workOrderManager.WorkOrderReply;
import com.crm.model.qo.workOrderManager.WorkOrderQO;
import com.crm.model.vo.workOrderManager.WorkOrderReplyVO;
import com.crm.model.vo.workOrderManager.WorkOrderVO;

import java.util.List;

/**
 * @Author baijian
 * @Date 2021/05/18 14:48 下午
 */
public interface WorkOrderService {


    /**
     * 管理模块 -- 工单管理列表
     * @param pageIndex 页码
     * @param pageSize  分页大小
     * @param sortName  排序列名字
     * @param sortOrder 排序规则(asc/desc)
     * @param workOrderQO 工单QO
     * @return
     */
    DhPageInfo<WorkOrderVO> workOrderList(Integer pageIndex, Integer pageSize, String sortName, String sortOrder, WorkOrderQO workOrderQO);

    /**
     * 工单管理-新增工单
     * @param workOrder 工单实体类
     * @return
     */
    String addWorkOrder(WorkOrder workOrder);

    /**
     * 工单管理-工单列表-回复工单
     * @param workOrderReply 工单实体类
     * @return
     */
    String addWorkOrderReply(WorkOrderReply workOrderReply);

    /**
     * 工单管理-工单列表-回复工单列表
     * @param workOrderId 工单id
     * @return
     */
    List<WorkOrderReplyVO> workOrderReplyList(String workOrderId);

    /**
     * 用户端-工单管理-工单详情
     * @param workOrderId 工单id
     * @return
     */
    WorkOrder getWorkOrderById(String workOrderId);

    /**
     * 修改工单
     * @Author renshaorong
     * @Date 2021/7/20
     * @param workOrder
     * @return
     */
    boolean updateByPrimaryKeySelective(WorkOrder workOrder);

    /**
     * 工单管理-超级管理员-扣除信用值
     * @param workOrderCreditDeductRecord 工单扣除信用值记录
     * @return
     */
    Boolean creditDeduct(WorkOrderCreditDeductRecord workOrderCreditDeductRecord);
}
